const arr = [1, 2, 3, 4, 5, 6, 7, 8]

const index = 10
let node = head//头节点
for (let i = 0; i < index && node; i++) {

    node = node.next


}